package com.blog.check.resultenum;

import com.blog.check.ChkRsInterface;

/**
 * 博客枚举
 *
 * @author 泡面ing
 * @date 2021/12/03
 */
public enum BlogChkRsEnum implements ChkRsInterface {

    /**
     * 成功
     */
    SUCCESS(OK,"OK"),
    /**
     * 非法标识不存在
     */
    ILLEGAL_ID_NOT_EXIST(BLOG + 10010,"博客(id:{})不存在"),
    ILLEGAL_TYPE_NOT_EXIST(BLOG + 10011,"博客类型id(id:{})不存在"),
    TITLE_MUST_NOT_BE_NULL(BLOG + 20010,"博客标题不能为空"),
    TYPE_MUST_NOT_BE_NULL(BLOG + 20011, "博客类型不能为空"),
    CONTENT_MUST_NOT_NULL(BLOG + 20012,"博客不能为空"),
    USER_IS_NOT_LOGIN(USER + 20000,"用户未登录"),

    ;

    private final int code;
    private final String msg;

    BlogChkRsEnum(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    @Override
    public int getCode() {
        return this.code;
    }

    @Override
    public String getMsg() {
        return this.msg;
    }
}

